package com.qll123.android;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.qll123.android.aop.AopActivity;
import com.qll123.android.apt.AptActivity;
import com.tencent.mmkv.MMKV;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String rootDir = MMKV.initialize(this);
        System.out.println("mmkv root: " + rootDir);



        setContentView(R.layout.activity_main);
        findViewById(R.id.button_aop).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                aopTest();
            }
        });
        findViewById(R.id.button_apt).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                aptTest();
            }
        });
    }


    private void aopTest() {
        Intent intent = new Intent();
        intent.setClass(this, AopActivity.class);
        this.startActivity(intent);
    }

    private void aptTest() {
        Intent intent = new Intent();
        intent.setClass(this, AptActivity.class);
        this.startActivity(intent);
    }
}
